﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace OL.FrameCore.WebUI.ViewModels.User
{
    public class PostUpdateUserViewRequest
    {
        public int Id { get; set; }

        [Required(ErrorMessage = "用户名不能为空")]
        [StringLength(20, ErrorMessage = "用户名不能超过20个字符")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "姓名不能为空")]
        [StringLength(20, ErrorMessage = "姓名不能超过20个字符")]
        public string TrueName { get; set; }
        public int Sex { get; set; }

        [Required(ErrorMessage = "电话不能为空")]
        [StringLength(20, ErrorMessage = "电话不能超过20个字符")]
        public string Phone { get; set; }

        [Required(ErrorMessage = "邮箱不能为空")]
        [StringLength(200, ErrorMessage = "邮箱不能超过200个字符")]
        [EmailAddress(ErrorMessage = "邮箱格式错误")]
        public string Email { get; set; }
        public int DeptId { get; set; }
    }
}
